cmake_minimum_required(VERSION 2.8)  
project(CMakeTest)  
find_package(OpenCV REQUIRED)  
add_executable(testcmake test.cpp)  
target_link_libraries(testcmake ${OpenCV_LIBS})  
